﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NWN.GDY.Service.Entity
{
    public class HandCard
    {
        public List<Card> Cards { set; get; }
        public HandCardType Type { set; get; }

        public string ToSimpleLog()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("牌型：" + this.Type.ToString());
            foreach (Card c in Cards)
            {
                sb.Append(c.SimpleName).Append("|");
            }
            return sb.ToString();
        }

        public string ToIds()
        {
            StringBuilder sb = new StringBuilder();
            foreach (Card c in Cards)
            {
                sb.Append(c.CardID).Append(",");
            }
            return sb.ToString().TrimEnd(',');
        }
    }

    public enum HandCardType : int
    {
        Single = 1,
        Double = 2,
        Straight = 3,
        Bomb = 10,
        DoubleBomb = 11,
        TripleBomb = 12,
        FourfoldBomb = 13,
        FiveTimesBomb = 14,
        SixTimesBomb = 15,
    }
}
